import type { CreateParams, DelParams, EditParams, MenuItem, Params } from '@/types/munuType'
import request from '@/utils/request'

export default {
  // 菜单列表
  getMenuList(params?: Params) {
    return request.get<MenuItem[]>('/menu/list', params)
  },
  // 创建菜单
  createMenu(params: CreateParams) {
    return request.post('/menu/create', params)
  }, // 修改菜单
  editMenu(params: EditParams) {
    return request.post('/menu/edit', params)
  },
  // 删除菜单
  delMenuById(params: DelParams) {
    return request.post('/menu/delete', params)
  }
}
